Optimal. Leaf size=175 \[ \frac {B}{9 b g^4 (a+b x)^3}-\frac {B d}{6 b (b c-a d) g^4 (a+b x)^2}+\frac {B d^2}{3 b (b c-a d)^2 g^4 (a+b x)}+\frac {B d^3 \log (a+b x)}{3 b (b c-a d)^3 g^4}-\frac {B d^3 \log (c+d x)}{3 b (b c-a d)^3 g^4}-\frac {A+B \log \left (\frac {e (c+d x)}{a+b x}\right )}{3 b g^4 (a+b x)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 175, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2548, 21, 46}
\begin {gather*} -\frac {B \log \left (\frac {e (c+d x)}{a+b x}\right )+A}{3 b g^4 (a+b x)^3}+\frac {B d^3 \log (a+b x)}{3 b g^4 (b c-a d)^3}-\frac {B d^3 \log (c+d x)}{3 b g^4 (b c-a d)^3}+\frac {B d^2}{3 b g^4 (a+b x) (b c-a d)^2}-\frac {B d}{6 b g^4 (a+b x)^2 (b c-a d)}+\frac {B}{9 b g^4 (a+b x)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 46
Rule 2548
Rubi steps
\begin {align*} \int \frac {A+B \log \left (\frac {e (c+d x)}{a+b x}\right )}{(a g+b g x)^4} \, dx &=-\frac {A+B \log \left (\frac {e (c+d x)}{a+b x}\right )}{3 b g^4 (a+b x)^3}+\frac {B \int \frac {-b c+a d}{g^3 (a+b x)^4 (c+d x)} \, dx}{3 b g}\\ &=-\frac {A+B \log \left (\frac {e (c+d x)}{a+b x}\right )}{3 b g^4 (a+b x)^3}-\frac {(B (b c-a d)) \int \frac {1}{(a+b x)^4 (c+d x)} \, dx}{3 b g^4}\\ &=-\frac {A+B \log \left (\frac {e (c+d x)}{a+b x}\right )}{3 b g^4 (a+b x)^3}-\frac {(B (b c-a d)) \int \left (\frac {b}{(b c-a d) (a+b x)^4}-\frac {b d}{(b c-a d)^2 (a+b x)^3}+\frac {b d^2}{(b c-a d)^3 (a+b x)^2}-\frac {b d^3}{(b c-a d)^4 (a+b x)}+\frac {d^4}{(b c-a d)^4 (c+d x)}\right ) \, dx}{3 b g^4}\\ &=\frac {B}{9 b g^4 (a+b x)^3}-\frac {B d}{6 b (b c-a d) g^4 (a+b x)^2}+\frac {B d^2}{3 b (b c-a d)^2 g^4 (a+b x)}+\frac {B d^3 \log (a+b x)}{3 b (b c-a d)^3 g^4}-\frac {B d^3 \log (c+d x)}{3 b (b c-a d)^3 g^4}-\frac {A+B \log \left (\frac {e (c+d x)}{a+b x}\right )}{3 b g^4 (a+b x)^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 141, normalized size = 0.81 \begin {gather*} \frac {\frac {B \left ((b c-a d) \left (11 a^2 d^2+a b d (-7 c+15 d x)+b^2 \left (2 c^2-3 c d x+6 d^2 x^2\right )\right )+6 d^3 (a+b x)^3 \log (a+b x)-6 d^3 (a+b x)^3 \log (c+d x)\right )}{(b c-a d)^3}-6 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )}{18 b g^4 (a+b x)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(513\) vs.
\(2(166)=332\).
time = 0.41, size = 514, normalized size = 2.94 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 430 vs.
\(2 (164) = 328\).
time = 0.30, size = 430, normalized size = 2.46 \begin {gather*} \frac {1}{18} \, B {\left (\frac {6 \, b^{2} d^{2} x^{2} + 2 \, b^{2} c^{2} - 7 \, a b c d + 11 \, a^{2} d^{2} - 3 \, {\left (b^{2} c d - 5 \, a b d^{2}\right )} x}{{\left (b^{6} c^{2} - 2 \, a b^{5} c d + a^{2} b^{4} d^{2}\right )} g^{4} x^{3} + 3 \, {\left (a b^{5} c^{2} - 2 \, a^{2} b^{4} c d + a^{3} b^{3} d^{2}\right )} g^{4} x^{2} + 3 \, {\left (a^{2} b^{4} c^{2} - 2 \, a^{3} b^{3} c d + a^{4} b^{2} d^{2}\right )} g^{4} x + {\left (a^{3} b^{3} c^{2} - 2 \, a^{4} b^{2} c d + a^{5} b d^{2}\right )} g^{4}} - \frac {6 \, \log \left (\frac {d x e}{b x + a} + \frac {c e}{b x + a}\right )}{b^{4} g^{4} x^{3} + 3 \, a b^{3} g^{4} x^{2} + 3 \, a^{2} b^{2} g^{4} x + a^{3} b g^{4}} + \frac {6 \, d^{3} \log \left (b x + a\right )}{{\left (b^{4} c^{3} - 3 \, a b^{3} c^{2} d + 3 \, a^{2} b^{2} c d^{2} - a^{3} b d^{3}\right )} g^{4}} - \frac {6 \, d^{3} \log \left (d x + c\right )}{{\left (b^{4} c^{3} - 3 \, a b^{3} c^{2} d + 3 \, a^{2} b^{2} c d^{2} - a^{3} b d^{3}\right )} g^{4}}\right )} - \frac {A}{3 \, {\left (b^{4} g^{4} x^{3} + 3 \, a b^{3} g^{4} x^{2} + 3 \, a^{2} b^{2} g^{4} x + a^{3} b g^{4}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 411 vs.
\(2 (164) = 328\).
time = 0.34, size = 411, normalized size = 2.35 \begin {gather*} -\frac {2 \, {\left (3 \, A - B\right )} b^{3} c^{3} - 9 \, {\left (2 \, A - B\right )} a b^{2} c^{2} d + 18 \, {\left (A - B\right )} a^{2} b c d^{2} - {\left (6 \, A - 11 \, B\right )} a^{3} d^{3} - 6 \, {\left (B b^{3} c d^{2} - B a b^{2} d^{3}\right )} x^{2} + 3 \, {\left (B b^{3} c^{2} d - 6 \, B a b^{2} c d^{2} + 5 \, B a^{2} b d^{3}\right )} x + 6 \, {\left (B b^{3} d^{3} x^{3} + 3 \, B a b^{2} d^{3} x^{2} + 3 \, B a^{2} b d^{3} x + B b^{3} c^{3} - 3 \, B a b^{2} c^{2} d + 3 \, B a^{2} b c d^{2}\right )} \log \left (\frac {{\left (d x + c\right )} e}{b x + a}\right )}{18 \, {\left ({\left (b^{7} c^{3} - 3 \, a b^{6} c^{2} d + 3 \, a^{2} b^{5} c d^{2} - a^{3} b^{4} d^{3}\right )} g^{4} x^{3} + 3 \, {\left (a b^{6} c^{3} - 3 \, a^{2} b^{5} c^{2} d + 3 \, a^{3} b^{4} c d^{2} - a^{4} b^{3} d^{3}\right )} g^{4} x^{2} + 3 \, {\left (a^{2} b^{5} c^{3} - 3 \, a^{3} b^{4} c^{2} d + 3 \, a^{4} b^{3} c d^{2} - a^{5} b^{2} d^{3}\right )} g^{4} x + {\left (a^{3} b^{4} c^{3} - 3 \, a^{4} b^{3} c^{2} d + 3 \, a^{5} b^{2} c d^{2} - a^{6} b d^{3}\right )} g^{4}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 656 vs.
\(2 (151) = 302\).
time = 2.01, size = 656, normalized size = 3.75 \begin {gather*} - \frac {B \log {\left (\frac {e \left (c + d x\right )}{a + b x} \right )}}{3 a^{3} b g^{4} + 9 a^{2} b^{2} g^{4} x + 9 a b^{3} g^{4} x^{2} + 3 b^{4} g^{4} x^{3}} + \frac {B d^{3} \log {\left (x + \frac {- \frac {B a^{4} d^{7}}{\left (a d - b c\right )^{3}} + \frac {4 B a^{3} b c d^{6}}{\left (a d - b c\right )^{3}} - \frac {6 B a^{2} b^{2} c^{2} d^{5}}{\left (a d - b c\right )^{3}} + \frac {4 B a b^{3} c^{3} d^{4}}{\left (a d - b c\right )^{3}} + B a d^{4} - \frac {B b^{4} c^{4} d^{3}}{\left (a d - b c\right )^{3}} + B b c d^{3}}{2 B b d^{4}} \right )}}{3 b g^{4} \left (a d - b c\right )^{3}} - \frac {B d^{3} \log {\left (x + \frac {\frac {B a^{4} d^{7}}{\left (a d - b c\right )^{3}} - \frac {4 B a^{3} b c d^{6}}{\left (a d - b c\right )^{3}} + \frac {6 B a^{2} b^{2} c^{2} d^{5}}{\left (a d - b c\right )^{3}} - \frac {4 B a b^{3} c^{3} d^{4}}{\left (a d - b c\right )^{3}} + B a d^{4} + \frac {B b^{4} c^{4} d^{3}}{\left (a d - b c\right )^{3}} + B b c d^{3}}{2 B b d^{4}} \right )}}{3 b g^{4} \left (a d - b c\right )^{3}} + \frac {- 6 A a^{2} d^{2} + 12 A a b c d - 6 A b^{2} c^{2} + 11 B a^{2} d^{2} - 7 B a b c d + 2 B b^{2} c^{2} + 6 B b^{2} d^{2} x^{2} + x \left (15 B a b d^{2} - 3 B b^{2} c d\right )}{18 a^{5} b d^{2} g^{4} - 36 a^{4} b^{2} c d g^{4} + 18 a^{3} b^{3} c^{2} g^{4} + x^{3} \cdot \left (18 a^{2} b^{4} d^{2} g^{4} - 36 a b^{5} c d g^{4} + 18 b^{6} c^{2} g^{4}\right ) + x^{2} \cdot \left (54 a^{3} b^{3} d^{2} g^{4} - 108 a^{2} b^{4} c d g^{4} + 54 a b^{5} c^{2} g^{4}\right ) + x \left (54 a^{4} b^{2} d^{2} g^{4} - 108 a^{3} b^{3} c d g^{4} + 54 a^{2} b^{4} c^{2} g^{4}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 382 vs.
\(2 (164) = 328\).
time = 2.93, size = 382, normalized size = 2.18 \begin {gather*} -\frac {{\left (\frac {18 \, {\left (d x e + c e\right )} B d^{2} e^{2} \log \left (\frac {d x e + c e}{b x + a}\right )}{b x + a} - \frac {18 \, {\left (d x e + c e\right )}^{2} B b d e \log \left (\frac {d x e + c e}{b x + a}\right )}{{\left (b x + a\right )}^{2}} + \frac {18 \, {\left (d x e + c e\right )} A d^{2} e^{2}}{b x + a} - \frac {18 \, {\left (d x e + c e\right )} B d^{2} e^{2}}{b x + a} - \frac {18 \, {\left (d x e + c e\right )}^{2} A b d e}{{\left (b x + a\right )}^{2}} + \frac {9 \, {\left (d x e + c e\right )}^{2} B b d e}{{\left (b x + a\right )}^{2}} + \frac {6 \, {\left (d x e + c e\right )}^{3} B b^{2} \log \left (\frac {d x e + c e}{b x + a}\right )}{{\left (b x + a\right )}^{3}} + \frac {6 \, {\left (d x e + c e\right )}^{3} A b^{2}}{{\left (b x + a\right )}^{3}} - \frac {2 \, {\left (d x e + c e\right )}^{3} B b^{2}}{{\left (b x + a\right )}^{3}}\right )} {\left (\frac {b c}{{\left (b c e - a d e\right )} {\left (b c - a d\right )}} - \frac {a d}{{\left (b c e - a d e\right )} {\left (b c - a d\right )}}\right )}}{18 \, {\left (b^{2} c^{2} g^{4} e^{2} - 2 \, a b c d g^{4} e^{2} + a^{2} d^{2} g^{4} e^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.88, size = 339, normalized size = 1.94 \begin {gather*} \frac {B\,b\,c^2}{9\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {A\,b\,c^2}{3\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {B\,\ln \left (\frac {e\,\left (c+d\,x\right )}{a+b\,x}\right )}{3\,b\,g^4\,{\left (a+b\,x\right )}^3}-\frac {A\,a^2\,d^2}{3\,b\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}+\frac {11\,B\,a^2\,d^2}{18\,b\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}+\frac {5\,B\,a\,d^2\,x}{6\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}+\frac {B\,b\,d^2\,x^2}{3\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}+\frac {2\,A\,a\,c\,d}{3\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {7\,B\,a\,c\,d}{18\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {B\,b\,c\,d\,x}{6\,g^4\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}+\frac {B\,d^3\,\mathrm {atan}\left (\frac {a\,d\,1{}\mathrm {i}+b\,c\,1{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}\right )\,2{}\mathrm {i}}{3\,b\,g^4\,{\left (a\,d-b\,c\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________